<?php


namespace app\validate\cart;


use think\Validate;

class PartnerDriveValidate extends Validate
{
    protected $rule = [
        'order_id' => 'require|gt:0',
        'duration' => 'require',
        'time' => 'require',
        'username' => 'require',
        'mobile' => 'require|mobile',
        'address' => 'require',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
        'order_id.require' => '请选择套餐',
        'order_id.gt' => '套餐错误',
        'duration.require' => '请选择时长',
        'time.require' => '请选择预约时间',
        'username.require' => '姓名不能为空',
        'mobile.require' => '电话不能为空',
        'mobile.mobile' => '电话格式错误',
        'address.require' => '请选择地址',
    ];
}